<template>
  <router-view></router-view>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { settingStore } from '@renderer/store/setStore'
const setStoreData = settingStore()
let myApi
onMounted(() => {
  myApi = window.api
  myApi.onUpdateStorage((_, data, name) => {
    console.log(name);
    setStoreData.$state = JSON.parse(data)
    switch (name) {
      case 'setStoreData':
        setStoreData.$state = JSON.parse(data)
        break
    }
  })
})
</script>

<style scoped>
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
</style>